<template>
    <div class="shopping">
        <van-nav-bar
                title="标题"
                left-text="返回"
                left-arrow
                @click-left="onClickLeft"
        />
        <van-card
            :num=number
            price="2.00"
            desc="描述信息"
            title="商品标题"
            thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
            v-for="item in 3"
            :key="item"
        >
            <template #footer>
            <van-button size="small" @click="handelAdd">+</van-button>
            <van-button size="small" @click="handelReduce">-</van-button>
            </template>

        </van-card>
    </div>
</template>

<script>
    export default {
        name: "ShoppingCar",
        data(){
            return{
                number:2
            }
        },
        methods:{
            onClickLeft(){
                this.$router.back()
            },
            handelAdd(){
                this.number++
            },
            handelReduce(){
                this.number--
            }
        }
    }
</script>

<style lang="less" scoped>

</style>